//
//  HWGuanlianPhoneTableViewCell.m
//  HWanGame
//
//  Created by 陈道斌 on 2019/10/29.
//  Copyright © 2019 Chendaobin. All rights reserved.
//

#import "HWGuanlianPhoneTableViewCell.h"
#import "Countdown.h"

@implementation HWGuanlianPhoneTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}


- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        [self setupUI];
        
    }
    
    return  self;
    
}

- (void)setupUI {
    
      self.namelabel = [[UILabel alloc]initWithFrame:CGRectMake(15, 0, 60, 44)];
      self.namelabel.font = [UIFont systemFontOfSize:14];
      self.namelabel.textColor = RGB(51, 51, 51);
      self.namelabel.text = @"QQ号码";
     // self.namelabel.backgroundColor = [UIColor redColor];
      [self.contentView addSubview:self.namelabel];
    
    self.titleTextField = [[UITextField alloc]initWithFrame:CGRectMake( self.namelabel.right+13, 0, 300, 44)];
  
    NSMutableAttributedString *attrString = [[NSMutableAttributedString alloc] initWithString:@"请填写真实姓名" attributes:
               @{NSForegroundColorAttributeName:RGB(153, 153, 153),
                 NSFontAttributeName:[UIFont boldSystemFontOfSize:12]}
               ];
    self.titleTextField.attributedPlaceholder  = attrString;
    self.titleTextField.font = [UIFont systemFontOfSize:12];
    self.titleTextField.textAlignment = NSTextAlignmentLeft;
    self.titleTextField.textColor = RGB(51, 51, 51);
    [self.contentView addSubview:self.titleTextField];
    
    
    self.fenxianView = [[UIView alloc]initWithFrame:CGRectMake(0, 43, kScreenW, 1)];
    self.fenxianView.backgroundColor = xiatiaoyanSehui;
     [self.contentView addSubview:self.fenxianView];
    
    
    
       UIButton *xianshyanj = [UIButton buttonWithType:UIButtonTypeCustom];
        xianshyanj.frame = CGRectMake(kScreenW-70-15,4, 70, 35);
    NSString *yanzheng =  [HWjianzhiduiObject keylocalization:@"获取验证码"];
        [xianshyanj setTitle:yanzheng forState:UIControlStateNormal];
        [xianshyanj setTitleColor:RGB(26, 113, 255) forState:UIControlStateNormal];
       // xianshyanj.titleLabel.textAlignment = NSTextAlignmentRight;
      //  xianshyanj.backgroundColor = [UIColor redColor];
        xianshyanj.titleLabel.font = [UIFont systemFontOfSize:11];
    //    [xianshyanj setBackgroundImage:[UIImage imageNamed:@"sign_surep"] forState:UIControlStateNormal];
    //    [xianshyanj setBackgroundImage:[UIImage imageNamed:@"kaijisign_surep_b"] forState:UIControlStateSelected];
        
        self.codeBut = xianshyanj;
        [self.contentView  addSubview:xianshyanj];
        
        [xianshyanj addTarget:self action:@selector(xianshyanjTap:) forControlEvents:UIControlEventTouchUpInside];
        
    
    
    
}


// 获取验证码
- (void)xianshyanjTap:(UIButton *)sende {
    
//    if (![WMUtil validateMobile:self.titleTextField.text]) {
//
//        [MBProgressHUD showError:@"请输入正确的手机号"];
//        return ;
//
//
//    }
//

    
    [Countdown  StartTimeCodeBtn:sende];
    
    
    
   
    
    
    
    DLog(@"获取验证码");
    

    
}


@end
